# Copyright 2024-2025 Wenze Wei
#
# This file is part of StadionOS.
#
# This Source Code Form is subject to the terms of the GNU General Public License, v. 2.0.
# You can obtain a copy of the GPL at
# https://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
# the specific language governing rights and limitations under the License.

CC = gcc
CFLAGS = -std=c11 -Wall -Wextra -DWLR_USE_UNSTABLE -D_POSIX_C_SOURCE=200112L \
         $(shell pkg-config --cflags wlroots wayland-server xkbcommon) \
         -I/usr/include/libdrm -I/usr/include/pixman-1

LDFLAGS = $(shell pkg-config --libs wlroots wayland-server xkbcommon) \
          -lgbm -ldrm -lGLESv2 -lEGL

TARGET = onatu
SRC = main.c compositor.c input.c output.c animation.c

all: $(TARGET)

$(TARGET): $(SRC)
	$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)

clean:
	rm -f $(TARGET)
